// 没在点位上
<template>
  <div class="useCoupon2">
      <p>您当前的位置附近没有点位，请到活动点位使用优惠券！（最近的点位距您<span>{{minDistance}}</span>米）</p>
      <div class="bottom">
        <button @click="goBack()">返回</button>
        <navigator url="" hover-class="none" @click="checkAddress()">查看活动点位</navigator>
      </div>
  </div>
</template>

<script>

export default {
  data () {
    return {
      minDistance:'',
      minAddressName:'',
      minLatitude:'',
      minLongitude:'',
    }
  },

  methods: {
    goBack() {
      wx.navigateTo({url: '../myCoupon/main'})
    },
    checkAddress() {
      wx.navigateTo({url:`../map/main?minDistance=${this.minDistance}&minAddressName=${this.minAddressName}&minLatitude=${this.minLatitude}&minLongitude=${this.minLongitude}`})
    },
  },
  mounted() {
    //接收参数
    this.minDistance = this.$root.$mp.query.minDistance;
    this.minAddressName = this.$root.$mp.query.minAddressName;
    this.minLatitude = this.$root.$mp.query.minLatitude;
    this.minLongitude = this.$root.$mp.query.minLongitude;
  }
}
</script>

<style scoped lang="stylus">
.useCoupon2
  box-sizing border-box
  padding 0 50rpx
  p
    margin 200rpx 0 80rpx
    font-size 28rpx
  .bottom
    display flex
    button
      width 240rpx
      height 80rpx
      display block
      text-align center
      line-height 80rpx
      font-size 32rpx
      color #fff
      background #169bd5
    navigator 
      margin-top 40rpx
      text-decoration underline
    .navigator-hover 
      color blue
      background #169bd5

</style>
